import request from "@/config/request";

// 当前用户信息
export const fetchMyInfo = (params) => {
  return request({
    url: "/api/user.index/detail",
    method: "GET",
    params,
  });
};

// 订单列表
export const fetchOrderList = (params) => {
  return request({
    url: "/api/user.index/orderList",
    method: "POST",
    params,
  });
};

// 编辑用户信息
export const editUserDetail = (params) => {
  return request({
    url: "/api/user.index/editUserDetail",
    method: "POST",
    params,
  });
};

// 获取验证码
export const sendSmsCode = (params) => {
  return request({
    url: "/api/user/sendSmsCode",
    method: "GET",
    params,
    notToken: true,
  });
};

// 实名认证
export const realnameApi = (params) => {
  return request({
    url: "/api/user/Realname",
    method: "GET",
    params,
  });
};

// 实名认证支付
export const realpayApi = (params) => {
  return request({
    url: "/api/recharge/realpay",
    method: "POST",
    params,
  });
};
